Surface to borehole and borehole to surface electromagnetic measurements are used to analyze subterranean formations and determine the location of hydrocarbon reservoirs. During these measurements, the casing in the borehole causes current channeling along its vertical extent and results in an additive contribution to the electromagnetic fields due to currents induced on and leaking out of the surface of the casing. A vertical electric dipole is formed inside the casing as a finite length antenna with an equivalent moment. The ratio between the moment of the source and equivalent antenna is the casing attenuation factor, which increases with frequency. The screening effect of the casing may attenuate the signal and create less resolution to resistive targets behind the casing where the response of the target is used to determine the hydrocarbon reservoirs. It is difficult, however, to determine how the casing distorts any electromagnetic fields that are measured. Existing methods can thus be improved that take into greater account the distortion of the electromagnetic fields caused by the casing.